const express = require('express');
const { addArticleHandler } = require('../router_handler/article');

// 引入multer模块
const multer = require('multer');
const path = require('path');
const upload = multer({ dest: path.join(__dirname, '../uploads') });

const router = express.Router();
// 发布新文章
router.post('/add', upload.single('cover_img'), addArticleHandler);
module.exports = router;
// https://gitee.com/weldon/api_server
